home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 52 / Amiga Format AFCD52 (Issue 136, May 2000).iso / -serious- / programming / other / dopus412-gpl / library / config.h < prev    next >
C/C++ Source or Header  |  2000-02-28  |  8KB  |  365 lines

  1. /*
  2.  
  3. Directory Opus 4
  4. Original GPL release version 4.12
  5. Copyright 1993-2000 Jonathan Potter
  6.  
  7. This program is free software; you can redistribute it and/or
  8. modify it under the terms of the GNU General Public License
  9. as published by the Free Software Foundation; either version 2
  10. of the License, or (at your option) any later version.
  11.  
  12. This program is distributed in the hope that it will be useful,
  13. but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15. GNU General Public License for more details.
  16.  
  17. You should have received a copy of the GNU General Public License
  18. along with this program; if not, write to the Free Software
  19. Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  20.  
  21. All users of Directory Opus 4 (including versions distributed
  22. under the GPL) are entitled to upgrade to the latest version of
  23. Directory Opus version 5 at a reduced price. Please see
  24. http://www.gpsoft.com.au for more information.
  25.  
  26. The release of Directory Opus 4 under the GPL in NO WAY affects
  27. the existing commercial status of Directory Opus 5.
  28.  
  29. */
  30.  
  31. #define CONFIG_VERSION         10020
  32. #define CONFIG_MAGIC          0xFACE
  33.  
  34. #define OLD_CONFIG_VERSION      9999
  35. #define CONFIG_LESS_DODRIVES   10001
  36. #define CONFIG_OLD_FILETYPE    10002
  37. #define CONFIG_CHANGE_DOSREQ   10003
  38. #define CONFIG_CHANGE_BUFCOUNT 10004
  39. #define CONFIG_CHANGE_FILETYPE 10009
  40. #define CONFIG_NEW_FUNCTIONS   10010
  41. #define CONFIG_CHANGE_PALETTE  10012
  42. #define CONFIG_CHANGE_ARROWS   10013
  43. #define CONFIG_CHANGE_FTYPE    10014
  44. #define CONFIG_CHANGE_EXTERN   10015
  45.  
  46. #define NEW_CONFIG_VERSION     10016
  47. #define CONFIG_CHANGE_DISPLAY  10017
  48. #define CONFIG_CHANGE_CONFIGXY 10018
  49. #define CONFIG_CHANGE_DIMENS   10019
  50. #define CONFIG_NEW_SLIDERS     10020
  51.  
  52. #define FTYC_MATCH        1
  53. #define FTYC_MATCHNAME    2
  54. #define FTYC_MATCHBITS    3
  55. #define FTYC_MATCHCOMMENT 4
  56. #define FTYC_MATCHSIZE    5
  57. #define FTYC_MATCHDATE    6
  58. #define FTYC_MOVETO       7
  59. #define FTYC_MOVE         8
  60. #define FTYC_SEARCHFOR    9
  61. #define FTYC_OR         253
  62. #define FTYC_AND        254
  63. #define FTYC_ENDSECTION 255
  64.  
  65. #define DATE_DOS   1
  66. #define DATE_INT   2
  67. #define DATE_USA   4
  68. #define DATE_AUS   8
  69. #define DATE_SUBST 16
  70. #define DATE_12HOUR 32
  71.  
  72. #define SCRCLOCK_MEMORY    1
  73. #define SCRCLOCK_CPU       2
  74. #define SCRCLOCK_DATE      4
  75. #define SCRCLOCK_TIME      8
  76. #define SCRCLOCK_BYTES     64
  77. #define SCRCLOCK_C_AND_F   128
  78.  
  79. #define ICON_MEMORY    1
  80. #define ICON_CPU       2
  81. #define ICON_DATE      4
  82. #define ICON_TIME      8
  83. #define ICON_NOWINDOW  16
  84. #define ICON_APPICON   32
  85.  
  86. #define DISPLAY_NAME 0
  87. #define DISPLAY_SIZE 1
  88. #define DISPLAY_PROTECT 2
  89. #define DISPLAY_DATE 3
  90. #define DISPLAY_COMMENT 4
  91. #define DISPLAY_FILETYPE 5
  92. #define DISPLAY_LAST 5
  93.  
  94. #define FLAG_OUTWIND      1
  95. #define FLAG_OUTFILE      2
  96. #define FLAG_WB2F         4
  97. #define FLAG_DOPUSF       8
  98. #define FLAG_ASYNC       16
  99. #define FLAG_CDSOURCE    32
  100. #define FLAG_CDDEST      64
  101. #define FLAG_DOALL      128
  102. #define FLAG_RECURSE    256
  103. #define FLAG_RELOAD     512
  104. #define FLAG_ICONIFY   1024
  105. #define FLAG_NOQUOTE   2048
  106. #define FLAG_SCANSRCE  4096
  107. #define FLAG_SCANDEST  8192
  108. #define FLAG_SHELLUP  16384
  109. #define FLAG_DOPUSUP  32768
  110.  
  111. #define MENUCOUNT 100
  112. #define GADCOUNT 84
  113. #define DRIVECOUNT 32
  114. #define ARCHIVECOUNT 6
  115. #define NUMFONTS 16
  116.  
  117. #define OLDDRIVECOUNT 24
  118.  
  119. #define FILETYPE_FUNCNUM   16
  120.  
  121. #define FTFUNC_AUTOFUNC1   0
  122. #define FTFUNC_AUTOFUNC2   1
  123. #define FTFUNC_DOUBLECLICK 2
  124. #define FTFUNC_CLICKMCLICK 3
  125. #define FTFUNC_ANSIREAD    4
  126. #define FTFUNC_AUTOFUNC3   5
  127. #define FTFUNC_HEXREAD     6
  128. #define FTFUNC_LOOPPLAY    7
  129. #define FTFUNC_PLAY        8
  130. #define FTFUNC_AUTOFUNC4   9
  131. #define FTFUNC_READ        10
  132. #define FTFUNC_SHOW        11
  133.  
  134. struct olddopusgadget {
  135.     char name[10];
  136.     int which,stack;
  137.     unsigned char key,qual;
  138.     char type,pri,delay;
  139.     char fpen,bpen;
  140.     char pad[3];
  141.     char *function;
  142. };
  143.  
  144. struct dopusfunction {
  145.     char name[16];
  146.     int which,stack;
  147.     unsigned char key,qual;
  148.     char type,pri,delay;
  149.     char fpen,bpen;
  150.     char pad;
  151.     char *function;
  152. };
  153.  
  154. struct newdopusfunction {
  155.     char *name;
  156.     int pad2[3];
  157.     int which,stack;
  158.     unsigned char key,qual;
  159.     char type,pri,delay;
  160.     char fpen,bpen;
  161.     char pad;
  162.     char *function;
  163. };
  164.  
  165. struct dopusdrive {
  166.     char name[10];
  167.     char path[33];
  168.     unsigned char key,qual;
  169.     char fpen,bpen;
  170.     char pad;
  171. };
  172.  
  173. struct olddopusfiletype {
  174.     struct dopusfiletype *next;
  175.     char type[40];
  176.     char filepat[60];
  177.     char recogchars[100];
  178.     char actionstring[4][60];
  179.     int which[4],stack[4];
  180.     char pri[4],delay[4];
  181.     char and;
  182.     char pad[3];
  183.     char *function[4];
  184. };
  185.  
  186. struct dopusfiletype {
  187.     struct dopusfiletype *next;
  188.     char type[32];
  189.     char typeid[8];
  190.     char actionstring[FILETYPE_FUNCNUM][40];
  191.     int which[FILETYPE_FUNCNUM],stack[FILETYPE_FUNCNUM];
  192.     char pri[FILETYPE_FUNCNUM],delay[FILETYPE_FUNCNUM];
  193.     unsigned char *recognition;
  194.     char *function[FILETYPE_FUNCNUM];
  195.     char *iconpath;
  196. };
  197.  
  198. struct wr_dopusfiletype {
  199.     struct dopusfiletype *next;
  200.     char type[40];
  201.     char actionstring[FILETYPE_FUNCNUM][40];
  202.     int which[FILETYPE_FUNCNUM],stack[FILETYPE_FUNCNUM];
  203.     char pri[FILETYPE_FUNCNUM],delay[FILETYPE_FUNCNUM];
  204. };
  205.  
  206. struct dopusgadgetbanks {
  207.     struct newdopusfunction gadgets[GADCOUNT];
  208.     struct dopusgadgetbanks *next;
  209. };
  210.  
  211. struct dopushotkey {
  212.     struct dopushotkey *next;
  213.     UWORD code,qualifier;
  214.     char name[40];
  215.     struct dopusfunction func;
  216. };
  217.  
  218. struct Config {
  219.     USHORT version;
  220.     USHORT magic;
  221.  
  222.     char copyflags;
  223.     char deleteflags;
  224.     char errorflags;
  225.     unsigned char generalflags;
  226.     char iconflags;
  227.     char existflags;
  228.     char sepflags;
  229.     char sortflags;
  230.     char dynamicflags;
  231.     char sortmethod[2];
  232.  
  233.     char hotkeyflags;
  234.  
  235.     char menutit[5][16];
  236.     struct newdopusfunction menu[MENUCOUNT];
  237.  
  238.     struct dopusfunction drive[DRIVECOUNT];
  239.  
  240.     char outputcmd[80],output[80];
  241.     int gadgetrows;
  242.  
  243.     char separatemethod[2];
  244.  
  245.     char language[30];
  246.  
  247.     char displaypos[2][16];
  248.     char displaylength[2][16];
  249.  
  250.     char pubscreen_name[80];
  251.  
  252.     USHORT Palette[16];
  253.     char gadgettopcol,gadgetbotcol;
  254.     char statusfg,statusbg;
  255.     char filesfg,filesbg,filesselfg,filesselbg;
  256.     char dirsfg,dirsbg,dirsselfg,dirsselbg;
  257.     char clockfg,clockbg;
  258.     char requestfg,requestbg;
  259.     char disknamefg,disknamebg,disknameselfg,disknameselbg;
  260.     char slidercol,arrowfg,arrowbg,littlegadfg,littlegadbg;
  261.  
  262.     char pad3;
  263.  
  264.     char scrdepth;
  265.     char screenflags;
  266.     int screenmode;
  267.     int scrw,scrh;
  268.     char fontbuf[40];
  269.     char arrowpos[3];
  270.  
  271.     char pad4;
  272.  
  273.     char startupscript[80];
  274.     char dirflags;
  275.     unsigned char bufcount;
  276.  
  277.     char pad5[2];
  278.  
  279.     char autodirs[2][30];
  280.     char pad5a[80];
  281.     UWORD hotkeycode,hotkeyqual;
  282.  
  283.     char toolicon[80],projecticon[80],drawericon[80],defaulttool[80];
  284.     char priority;
  285.     char showdelay,viewbits,fadetime,tabsize;
  286.  
  287.     char pad7[2];
  288.  
  289.     char hiddenbit;
  290.     char showpat[40],hidepat[40];
  291.     char showpatparsed[40],hidepatparsed[40];
  292.     char icontype,scrclktype,showfree;
  293.  
  294.     char pad8;
  295.  
  296.     short iconx,icony;
  297.     short wbwinx,wbwiny;
  298.  
  299.     char configreturnscript[80];
  300.  
  301.     char fontsizes[NUMFONTS];
  302.     char fontbufs[NUMFONTS][40];
  303.  
  304.     char uniconscript[80];
  305.     char sliderbgcol;
  306.  
  307.     char pad_foo;
  308.  
  309.     short scr_winx,scr_winy;
  310.     short scr_winw,scr_winh;
  311.  
  312.     char morepadding[231];
  313.  
  314.     char old_displaypos[2][8];
  315.     char dateformat,addiconflags;
  316.     char stringfgcol,stringbgcol;
  317.     char namelength[2];
  318.     char sliderwidth,sliderheight;
  319.     char formatflags;
  320.     short iconbutx,iconbuty;
  321.     char stringheight;
  322.     char stringselfgcol,stringselbgcol;
  323.     char generalscreenflags;
  324.  
  325.     struct Rectangle scrollborders[2];
  326.  
  327.     char old_displaylength[2][8];
  328.  
  329.     char shellstartup[30];
  330.  
  331.     char windowdelta;
  332.  
  333.     char pad9a[397];
  334.  
  335.     int loadexternal;
  336.  
  337.     ULONG new_palette[48];
  338.  
  339.     char arrowsize[3];
  340.  
  341.     char slider_pos;
  342.  
  343.     short config_x;
  344.     short config_y;
  345.  
  346.     char pad10[1414];
  347. };
  348.  
  349. struct ConfigStuff {
  350.     struct Config *config;
  351.     struct DOpusRemember *typekey;
  352.     struct dopusfiletype *firsttype;
  353.     struct dopusgadgetbanks *firstbank,*curbank;
  354.     struct dopushotkey *firsthotkey;
  355. };
  356.  
  357. #define MODE_WORKBENCHUSE    1
  358. #define MODE_WORKBENCHCLONE  2
  359.  
  360. #define SCRFLAGS_DEFWIDTH   1
  361. #define SCRFLAGS_DEFHEIGHT  2
  362. #define SCRFLAGS_HALFHEIGHT 4
  363.  
  364. extern __asm SwapMem(register __a0 char *src,register __a1 char *dst,register __d0 int size);
  365.